<!DOCTYPE html>
<html lang="zh-cn">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../semantic/dist/semantic.min.css">
    <title>semantic-ui-dropdown</title>
    <style>

    </style>
</head>

<body>
    <div class="ui header dividing">Dropdown</div>
    <div class="ui container">
        <div class="ui dropdown">
            课程 <i class="dropdown icon"></i>
            <div class="menu">
                <div class="item">HTML</div>
                <div class="item">CSS</div>
                <div class="item">JAVASCRIPT</div>
            </div>
        </div>

        <div class="ui divider"></div>

        <div class="ui selection dropdown">
            <span class="text">课程</span>
            <i class="dropdown icon"></i>
            <div class="menu">
                <div class="item">HTML</div>
                <div class="item">CSS</div>
                <div class="item">JAVASCRIPT</div>
            </div>
        </div>

        <div class="ui divider"></div>

        <div class="ui selection dropdown">
            <input type="hidden" name="course">
            <div class="default text">选择课程</div>
            <i class="dropdown icon"></i>
            <div class="menu">
                <div class="item" data-value="1">HTML</div>
                <div class="item" data-value="2">CSS</div>
                <div class="item" data-value="3">JAVASCRIPT</div>
            </div>
        </div>

        <div class="ui divider"></div>

        <div class="ui search selection dropdown">
            <input type="hidden" name="course">
            <div class="default text">选择课程</div>
            <i class="dropdown icon"></i>
            <div class="menu">
                <div class="item" data-value="1">HTML</div>
                <div class="item" data-value="2">CSS</div>
                <div class="item" data-value="3">JAVASCRIPT</div>
            </div>
        </div>

        <div class="ui divider"></div>

        <div class="ui olive left pointing dropdown labeled icon button">
            <i class="angle down icon"></i>
            <span class="text">选择课程</span>
            <div class="menu">
                <div class="ui icon search input">
                    <i class="search icon"></i>
                    <input type="text" placeholder="搜索">
                </div>
                <div class="item" data-value="1">HTML</div>
                <div class="item" data-value="2">CSS</div>
                <div class="item" data-value="3">JAVASCRIPT</div>
            </div>
        </div>

    </div>

    <script src="../../node_modules/jquery/dist/jquery.min.js"></script>
    <script src="../../semantic/dist/semantic.min.js"></script>
    <script>
        $('.ui.dropdown').dropdown();
        // 可以通过
        // $('input[name=course]').val() 来获取下拉菜单的值
    </script>
</body>

</html>
